﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace NFAPI
{
    public partial class QueueItem : Item
    {
        [XPath("/queue_item/position/text()")]
        public int Position { get; set; }

        [XPath("/queue_item/category[@scheme='http://api.netflix.com/categories/queue_availability' or @scheme='http://api.netflix.com/categories/queue_availablity']/@label")]
        public Availability Availability { get; set; }

        [XPath("/queue_item/availability_date/text()")]
        public long AvailabilityDate { get; set; }

        [XPath("/queue_item/updated/text()")]
        public long Updated { get; set; }

        [XPath("/queue_item/category[@scheme='http://api.netflix.com/categories/title_formats']/@label")]
        public Format Format { get; set; }

        [XPath("/queue_item/link[@rel='http://schemas.netflix.com/catalog/title']")]
        public Link TitleLink { get; set; }

        public override string TitleRef
        {
            get { return TitleLink.Href; }
        }
    }
}
